package com.yjzx.care.base;

public class ValueElement<V> implements Element<V> {
    boolean whether;
    V value;

    public ValueElement(boolean whether, V value) {
        this.whether = whether;
        this.value = value;
    }

    @Override
    public V getValue() {
        return whether ? value : null;
    }

}